import request from '@/config/axios'

export interface AcademicVO {
  id: number
  major: number
  studentNumber: number
  studentName: string
  academicCategory: number
  academicName: string
  publicationName: string
  awardDate: string
  instructor: string
  remark: string
  status: number
  reason: string
}

// 查询艺术作品列表
export const getAcademicPage = async (params) => {
  return await request.get({ url: `/data/academic/page`, params })
}

// 查询艺术作品详情
export const getAcademic = async (id: number) => {
  return await request.get({ url: `/data/academic/get?id=` + id })
}

// 新增艺术作品
export const createAcademic = async (data: AcademicVO) => {
  return await request.post({ url: `/data/academic/create`, data })
}

// 修改艺术作品
export const updateAcademic = async (data: AcademicVO) => {
  return await request.put({ url: `/data/academic/update`, data })
}

// 修改艺术作品
export const updateAcademicStatus = async (data: AcademicVO) => {
  return await request.put({ url: `/data/academic/updateStatus`, data })
}

// 删除艺术作品
export const deleteAcademic = async (id: number) => {
  return await request.delete({ url: `/data/academic/delete?id=` + id })
}

// 导出艺术作品 Excel
export const exportAcademic = async (params) => {
  return await request.download({ url: `/data/academic/export-excel`, params })
}
